package com.eas.ereceipt.app;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import com.actionbarsherlock.app.SherlockActivity;
import com.eas.ereceipt.R;

public class SignInActivity extends SherlockActivity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setupActionbar();
		setContentView(R.layout.activity_login);
	}
	
	private void setupActionbar(){
		getSupportActionBar().setDisplayShowHomeEnabled(false);
		getSupportActionBar().setDisplayShowTitleEnabled(false);
		getSupportActionBar().setDisplayShowCustomEnabled(true);
		getSupportActionBar().setCustomView(R.layout.sign_in_ab);
	}
	
	public void onClick(View v){
		switch (v.getId()) {
		case R.id.btnExit:
			finish();
			break;
		case R.id.btnSignIn:
			signIn();
			break;
		case R.id.tvSignUp:
			signUp();
			break;
		case R.id.tvForgotPass:
			forgotPass();
			break;
		default:
			break;
		}
	}

	private void forgotPass() {
		startActivity(new Intent(this, ForgotPassActivity.class));
	}

	private void signUp() {
		startActivity(new Intent(this, SignUpActiviy.class));
	}

	private void signIn() {
		finish();
		startActivity(new Intent(this, HomeActivity.class));
	}

}
